package com.example.demo.contorller;

import com.example.demo.common.ResultAdvice;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yyx
 * Date: 2023-11-03
 * Time: 11:41
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/getuser")
    public ResultAdvice getuser(){
        System.out.println("getuser");
        return ResultAdvice.success("getuser");
    }
    @RequestMapping("/reg")
    public ResultAdvice reg(){
        String str = null;
        System.out.println(str.hashCode());
        return ResultAdvice.success("reg");
    }
    @RequestMapping("/login")
    public ResultAdvice login(){
        System.out.println("login");
        return ResultAdvice.success("login");
    }
    @RequestMapping("/login2")
    public int login2(){
        System.out.println("login");
        return 1;
    }
    @RequestMapping("/login3")
    public String login3(){
        System.out.println("login3");
        return "login3";
    }
}
